using Bddify.Reporters;
using NUnit.Framework;

namespace Bddify.Tests.Reporters
{
    [TestFixture]
    public class WhenCreatingASimpleTag : HtmlReportSpecs
    {
        public override void Given()
        {
            SUT.TabCount = 2;
        }

        public override void When()
        {
            using (SUT.OpenTag(HtmlTag.body))
            {
                SUT.AddLine("<div id='id'>");
            }
        }

        [Test]
        public void ShouldOpenTheTag()
        {
            Assert.That(HtmlLines[0], Is.EqualTo("    <body>"));
        }

        [Test]
        public void ShouldCloseTheTag()
        {
            Assert.That(HtmlLines[2], Is.EqualTo("    </body>"));
        }

        [Test]
        public void ShouldIndentTheContentInsideTheTag()
        {
            Assert.That(HtmlLines[1].StartsWith("      <"));
        }



        //[Test]
        //public void ShouldIncreaseTheTabCount()
        //{
        //    Assert.That(SUT.TabCount, Is.EqualTo(3));
        //}
    }
}